﻿// Decompiled with JetBrains decompiler
// Type: CreateMfgByCoordinates.CApCreDialogTCLogic
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.CreateWeldPoint;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace CreateMfgByCoordinates;

internal class CApCreDialogTCLogic : CApCreateWpTCLogic
{
  private CApCreDialogManager _Manager = new CApCreDialogManager();

  public ITxValidator PartValidator => (ITxValidator) this._Manager.PartValidator;

  public void Accept(
    string wpName,
    TxTransformation frameLocation,
    ITxObject part,
    ITxObject weldContainer,
    ITxObject weldOperation)
  {
    this._Manager.WeldContainer = weldContainer as TxCompoundPart;
    this._Manager.WeldOperation = weldOperation as ITxWeldOperation;
    this._Manager.Accept(wpName, frameLocation, part);
  }

  public void Cancel() => this._Manager.Cancel();

  public bool IsDataValid(string mfgName, ITxObject weldContainer, ITxObject weldOperation)
  {
    bool flag = false;
    if (mfgName.Length > 0 && this.IsDataValid(weldContainer, weldOperation))
      flag = true;
    return flag;
  }

  public ITxObject GetSelectedPart() => (ITxObject) null;

  public bool IsPart(ITxObject obj) => this._Manager.IsPart(obj);

  public void SetTemporaryFrame(TxTransformation frameLocation)
  {
    this._Manager.SetTemporaryFrame(frameLocation);
  }

  private void RemoveTemporaryFrame() => this._Manager.RemoveTemporaryFrame();
}
